{{ define "title" }}{{ .Title }}{{ end }}

{{ define "css" }}

{{ if .Site.Params.highlightjs }}
{{ if .Site.Params.highlightjsTheme }}
<link rel="stylesheet" data-highlight href="https://shenmo7192.gitee.io/cdn-release/build/styles/{{ .Site.Params.highlightjsTheme }}.min.css" />
{{ else }}
<link rel="stylesheet" data-highlight href="https://shenmo7192.gitee.io/cdn-release/build/styles/default.min.css" />
{{ end }}
{{ end }}


<!-- 这里是引入Valine.min.js，为了引入魔改版，把官方版的屏蔽-->
<!--
{{ if .Site.Params.valine }}
<script src='//unpkg.com/valine/dist/Valine.min.js'></script>
{{ end }}
-->


	


        <script src='//shenmo7192.gitee.io/valine-hclonely//dist/Valine.min.js'></script>

	
	<!--上面这一行为魔改版本，来自https://www.jianshu.com/p/205aaa14dff3  原来的加速是//cdn.jsdelivr.net/gh/HCLonely/Valine@latest/dist/Valine.min.js -->





{{ end }}

{{ define "main" }}
<div class="ui relaxed centered grid dream-grid dream-grid-single"{{ if .Site.Params.reversePostAndAside }}style="flex-direction: row-reverse;"{{ end }}>
  <!-- len <nav id="TableOfContents"></nav> == 32 -->
  {{ $showTOC := ge (len .TableOfContents) 33 }}
  {{ $shareInAside := .Site.Params.shareInAside }}
  {{ $showAside := or $showTOC $shareInAside }}

  {{ if $showAside }}
  <aside class="sixteen wide mobile sixteen wide tablet three wide computer column dream-single-aside">
    {{ if $showTOC }}
    <div class="ui segment toc">
      {{ .TableOfContents }}
    </div>
    {{ end }}

    {{ if $shareInAside }}
    {{ partial "share1.html" . }}
    {{ end }}
  </aside>
  {{ end }}
  <div class="sixteen wide mobile sixteen wide tablet ten wide computer column markdown-body dream-single" id="dream-save-post-as-img">
    <section class="ui top attached segment">
      <header>
        <h1 class="ui large header">
          {{- .Title -}}
          <span class="sub header">
            <span class="left">
              @
              {{ if isset .Params "author" }}
                {{ if isset .Params "authorlink" }}
                  <a href="{{ .Params.authorlink }}" target="_blank">{{ .Params.author }}</a>
                {{ else }}
                  {{ .Params.author }}
                {{ end }}
              {{ else }}
                {{ .Site.Params.author }}
              {{ end }}

              | {{ if .Site.Params.Experimental.jsDate }}
                  <span data-format="luxon">{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}</span>
                {{ else }}
                  {{ if eq .Site.Language.Lang "zh" }}
                    {{ index .Site.Data.zh.Weekday (printf "%d" .Date.Weekday) }}，{{ index .Site.Data.zh.Month (printf "%d" .Date.Month) }} {{ .Date.Day }} 日，{{ .Date.Year }} 年
                  {{ else if eq .Site.Language.Lang "es" }}
                    {{ index .Site.Data.es.Weekday (printf "%d" .Date.Weekday) }}, {{ .Date.Day }} de {{ index .Site.Data.es.Month (printf "%d" .Date.Month) }} de {{ .Date.Year }}
                  {{ else if eq .Site.Language.Lang "pt" }}
                    {{ index .Site.Data.pt.Weekday (printf "%d" .Date.Weekday) }}, {{ .Date.Day }} de {{ index .Site.Data.pt.Month (printf "%d" .Date.Month) }} de {{ .Date.Year }}
                  {{ else if eq .Site.Language.Lang "fr" }}
                    {{ index .Site.Data.fr.Weekday (printf "%d" .Date.Weekday) }} {{ .Date.Day }} {{ index .Site.Data.fr.Month (printf "%d" .Date.Month) }} {{ .Date.Year }}
                  {{ else }}
                    {{ .Date.Format "Monday, Jan 2, 2006" }}
                  {{ end }}
                {{ end }}

              | {{ .ReadingTime }}{{ i18n "minuteRead" .ReadingTime }}

              {{ if ne .Params.nolastmod true }}
              | {{ i18n "updateAt" }}
                {{ if .Site.Params.Experimental.jsDate }}
                  <span data-format="luxon">{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}</span>
                {{ else }}
                  {{ if eq .Site.Language.Lang "zh" }}
                    {{ index .Site.Data.zh.Weekday (printf "%d" .Lastmod.Weekday) }}，{{ index .Site.Data.zh.Month (printf "%d" .Lastmod.Month) }} {{ .Lastmod.Day }} 日，{{ .Lastmod.Year }} 年
                  {{ else if eq .Site.Language.Lang "es" }}
                    {{ index .Site.Data.es.Weekday (printf "%d" .Lastmod.Weekday) }}, {{ .Lastmod.Day }} de {{ index .Site.Data.es.Month (printf "%d" .Lastmod.Month) }} de {{ .Lastmod.Year }}
                  {{ else if eq .Site.Language.Lang "pt" }}
                    {{ index .Site.Data.pt.Weekday (printf "%d" .Lastmod.Weekday) }}, {{ .Lastmod.Day }} de {{ index .Site.Data.pt.Month (printf "%d" .Lastmod.Month) }} de {{ .Lastmod.Year }}
                  {{ else if eq .Site.Language.Lang "fr" }}
                    {{ index .Site.Data.fr.Weekday (printf "%d" .Date.Weekday) }} {{ .Date.Day }} {{ index .Site.Data.fr.Month (printf "%d" .Date.Month) }} {{ .Date.Year }}
                  {{ else }}
                    {{ .Lastmod.Format "Monday, Jan 2, 2006" }}
                  {{ end }}
                {{ end }}
              {{ end }}
            </span>

            {{ if not $shareInAside }}
            {{ partial "share.html" . }}
            {{ end }}
          </span>
        </h1>
      </header>

      <article class="main">
        {{ if and .Params.Cover .Site.Params.showSummaryCoverInPost }}
        <img class="cover" src="{{ .Params.Cover }}" />
        {{ end }}

        {{ .Content | emojify }}
      </article>
    </section>

    {{ if .Site.DisqusShortname }}
    <article class="ui segment post-disqus-area" data-html2canvas-ignore>
      {{ partial "disqus.html" (dict "Context" . "Identifier" .RelPermalink) }}
    </article>
    {{ end }}

    {{ if .Site.Params.utterancesRepo }}
    <article class="ui segment utterances-comments" data-html2canvas-ignore>
      <script
        src="https://utteranc.es/client.js"
        repo="{{ .Site.Params.utterancesRepo }}"
        issue-term="og:title"
        theme="github-light"
        crossorigin="anonymous"
        async>
      </script>
    </article>
    {{ end }}

<!-- 这一段疑似为启动vcomments的关键段落，这里确认插入vcomment的地点。由于本人不会html，怕改错，所以保留并在config中启用valine以使用-->

    {{ if .Site.Params.valine }}
    <article class="ui segment" data-html2canvas-ignore>
      <div id="vcomments"></div>
    </article>

<!-- 结束 --->

<!--以下为原版读取config内容，不敢改，直接注释，万一挂了也能恢复-->
<!--开始注释
    <script>
      new Valine({
        el: '#vcomments',
        appId: {{ .Site.Params.LEANCLOUD_APP_ID }},
        appKey: {{ .Site.Params.LEANCLOUD_APP_KEY }},
        lang: {{ .Site.Params.VALINE_LANGUAGE }}
      })
    </script>

注释结束 -->


<script>
new Valine({
    el:'#vcomments',
placeholder: "期待你的回复哦ヽ(✿ﾟ▽ﾟ)ノ\n在邮件栏目填写QQ邮箱或者在昵称栏填写QQ号可以获取QQ头像和昵称哦~\n可以使用markdown哦～",
enableQQ:true,

    appId:'euHqWEo74Ia7dhJMLhwcqBU8-gzGzoHsz',
    appKey:'rbHg8yFAvTM0DNkJC1OAyswj',
verify:true,
tagMeta:["shenmo","小伙伴","访客"],
metaPlaceholder:{"nick":"昵称 / QQ 号","mail":"邮箱 (必填)"},
master:['3868cd2d4052241a00989a589e7fdef3','868f361381a07b9e262cd55cdc349769'],
friends:[],
    // 设置Bilibili表情包地址
    emojiCDN: '//i0.hdslb.com/bfs/emote/', 
    // 表情title和图片映射
    emojiMaps: {
        "tv_doge": "6ea59c827c414b4a2955fe79e0f6fd3dcd515e24.png",
      "tv_亲亲": "a8111ad55953ef5e3be3327ef94eb4a39d535d06.png",
      "tv_偷笑": "bb690d4107620f1c15cff29509db529a73aee261.png",
      "tv_再见": "180129b8ea851044ce71caf55cc8ce44bd4a4fc8.png",
      "tv_冷漠": "b9cbc755c2b3ee43be07ca13de84e5b699a3f101.png",
      "tv_发怒": "34ba3cd204d5b05fec70ce08fa9fa0dd612409ff.png",
      "tv_发财": "34db290afd2963723c6eb3c4560667db7253a21a.png",
      "tv_可爱": "9e55fd9b500ac4b96613539f1ce2f9499e314ed9.png",
      "tv_吐血": "09dd16a7aa59b77baa1155d47484409624470c77.png",
      "tv_呆": "fe1179ebaa191569b0d31cecafe7a2cd1c951c9d.png",
      "tv_呕吐": "9f996894a39e282ccf5e66856af49483f81870f3.png",
      "tv_困": "241ee304e44c0af029adceb294399391e4737ef2.png",
      "tv_坏笑": "1f0b87f731a671079842116e0991c91c2c88645a.png",
      "tv_大佬": "093c1e2c490161aca397afc45573c877cdead616.png",
      "tv_大哭": "23269aeb35f99daee28dda129676f6e9ea87934f.png",
      "tv_委屈": "d04dba7b5465779e9755d2ab6f0a897b9b33bb77.png",
      "tv_害羞": "a37683fb5642fa3ddfc7f4e5525fd13e42a2bdb1.png",
      "tv_尴尬": "7cfa62dafc59798a3d3fb262d421eeeff166cfa4.png",
      "tv_微笑": "70dc5c7b56f93eb61bddba11e28fb1d18fddcd4c.png",
      "tv_思考": "90cf159733e558137ed20aa04d09964436f618a1.png",
      "tv_惊吓": "0d15c7e2ee58e935adc6a7193ee042388adc22af.png",
      "tv_打脸": "56ab10b624063e966bfcb76ea5dc4794d87dfd47.png",
      "tv_抓狂": "fe31c08edad661d63762b04e17b8d5ae3c71a757.png",
      "tv_抠鼻": "c666f55e88d471e51bbd9fab9bb308110824a6eb.png",
      "tv_斜眼笑": "911f987aa8bc1bee12d52aafe62bc41ef4474e6c.png",
      "tv_无奈": "ea8ed89ee9878f2fece2dda0ea8a5dbfe21b5751.png",
      "tv_晕": "5443c22b4d07fb1907ccc610c8e6db254f2461b7.png",
      "tv_流汗": "cead1c351ab8d79e9f369605beb90148db0fbed3.png",
      "tv_流泪": "7e71cde7858f0cd50d74b0264aa26db612a8a167.png",
      "tv_流鼻血": "c32d39db2737f89b904ca32700d140a9241b0767.png",
      "tv_点赞": "f85c354995bd99e28fc76c869bfe42ba6438eff4.png",
      "tv_生气": "26702dcafdab5e8225b43ffd23c94ac1ff932654.png",
      "tv_生病": "8b0ec90e6b86771092a498c54f09fc94621c1900.png",
      "tv_疑问": "0793d949b18d7be716078349c202c15ff166f314.png",
      "tv_白眼": "c1d59f439e379ee50eef488bcb5e5378e5044ea4.png",
      "tv_皱眉": "72ccad6679fea0d14cce648b4d818e09b8ffea2d.png",
      "tv_目瞪口呆": "0b8cb81a68de5d5365212c99375e7ace3e7891b7.png",
      "tv_睡着": "8b196675b53af58264f383c50ad0945048290b33.png",
      "tv_笑哭": "1abc628f6d4f4caf9d0e7800878f4697abbc8273.png",
      "tv_腼腆": "89712c0d4af73e67f89e35cbc518420380a7f6f4.png",
      "tv_色": "61822c7e9aae5da76475e7892534545336b23a6f.png",
      "tv_调侃": "4bc022533ef31544ca0d72c12c808cf4a1cce3e3.png",
      "tv_调皮": "b9c41de8e82dd7a8515ae5e3cb63e898bf245186.png",
      "tv_鄙视": "6e72339f346a692a495b123174b49e4e8e781303.png",
      "tv_闭嘴": "c9e990da7f6e93975e25fd8b70e2e290aa4086ef.png",
      "tv_难过": "87f46748d3f142ebc6586ff58860d0e2fc8263ba.png",
      "tv_馋": "fc7e829b845c43c623c8b490ee3602b7f0e76a31.png",
      "tv_鬼脸": "0ffbbddf8a94d124ca2f54b360bbc04feb6bbfea.png",
      "tv_黑人问号": "45821a01f51bc867da9edbaa2e070410819a95b2.png",
      "tv_鼓掌": "1d21793f96ef4e6f48b23e53e3b9e42da833a0f6.png"
        // ... 更多表情
    } 
})
</script>



    {{ end }}
  </div>
</div>
{{ end }}

{{ define "js" }}

{{ if .Site.Params.Experimental.jsDate }}
<script src="https://unpkg.com/luxon@1.26.0"></script>

{{ partial "luxon.html" . }}
{{ end }}

<script src="{{ "/js/scrollToTop.js" | relURL }}"></script>

{{ if .Site.Params.highlightjs }}
<script src="{{ if .Site.Params.highlightjsCDN }}{{ .Site.Params.highlightjsCDN }}{{ else }}{{ "https://shenmo7192.gitee.io/cdn-release/build/highlight.min.js" }}{{ end}}"></script>

{{ if .Site.Params.highlightjsExtraLanguages }}
{{ range .Site.Params.highlightjsExtraLanguages }}
<script src="https://shenmo7192.gitee.io/cdn-release/build/languages/{{ . }}.min.js"></script>
{{ end }}
{{ end }}

{{ partial "highlight.html" . }}
{{ end }}

<script src="https://unpkg.com/html2canvas@1.0.0-rc.1"></script>
<script src="{{ "/js/post.js" | relURL }}" defer></script>
{{ end }}
